var express = require('express');
var router = express.Router();
var SqliteDB = require('./sqlite3db').SqliteDB;

/* GET users listing. */
router.get('/', function(req, res, next) {
  var sdb = new SqliteDB('db/user.db');
  var stus='';
  sdb.queryData("select * from student", function(data){
    if(data.length>0){
      stus = JSON.stringify(data);
    }
    res.send(stus);
  });  
});

module.exports = router;
